//
//  UpAndDownTitleView.m
//  OnionHome
//
//  Created by fengjie on 2019/9/14.
//  Copyright © 2019 FengJie. All rights reserved.
//

#import "UpAndDownTitleView.h"

@implementation UpAndDownTitleView

-(instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createUI];
    }
    return self;
}
-(void)createUI{
    [self addSubview:self.topTitle];
    [self addSubview:self.bottomTitle];
    
    [self.topTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.top.right.mas_equalTo(0);
    }];
    [self.bottomTitle mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.bottom.mas_equalTo(0);
        make.top.mas_equalTo(self.topTitle.mas_bottom).offset(5);
    }];
}
#pragma mark ---懒加载

-(UILabel*)topTitle{
    if(!_topTitle){
        _topTitle=[UILabel new];
        _topTitle.textColor = UIColorFromRGB(0x2C2C2C);
//        _topTitle.font = BOLDSYSTEMFONT(24);
        _topTitle.textAlignment = NSTextAlignmentCenter;
        _topTitle.text = @"0";
        _topTitle.font = DINMedium(24);
    }
    return _topTitle;
}
-(UILabel*)bottomTitle{
    if(!_bottomTitle){
        _bottomTitle=[UILabel new];
        _bottomTitle.textColor = UIColorFromRGB(0xA0A0A0);
        _bottomTitle.font = BOLDSYSTEMFONT(15);
        _bottomTitle.textAlignment = NSTextAlignmentCenter;
        _bottomTitle.text = @"文章";

    }
    return _bottomTitle;
}
@end
